2025-06-12
“What causes mothers to receive comprehensive postnatal care?”
DAGs help us:
Having a good idea of the causal structure of a question helps us know what to visualize.
DAGs:
We can use the daggity R package to visualize the the causal structure of the problems around the motivating research question
complete_dag <- dagify(
RCP ~ PQ + PC + WTP + PT + RA + RP,
PQ ~ PEC,
PC ~ DEP + JOB + INC + DIS,
WTP ~ PQ + INC + INS + RA + CO,
PT ~ PQ + RE + CO,
RA ~ PQ + RP + INS,
RP ~ PQ + AGE + OBE + MG + DM + HD + PP + PR + HT + GHT,
PEC ~ ST,
DEP ~ INC + JOB + CO,
JOB ~ EDU + CO + R + M + I + CC,
DIS ~ PEC,
INC ~ JOB + EDU + RE + PEC + AGE,
INS ~ JOB + PEC + AGE,
CO ~ PED + PIN + REL + PEC + CC,
PIN ~ PEC + PED,
EDU ~ PED + PIN + R + M + I + CC,
R ~ PR,
M ~ PM,
I ~ PI,
CC ~ PCC,
REL ~ RE,
OBE ~ PEC + AGE,
MG ~ AGE + OBE,
DM ~ AGE + OBE + INC,
HD ~ AGE + OBE + DM,
PP ~ AGE + MG,
PR ~ AGE + HT + GHT + MG,
HT ~ AGE + OBE,
GHT ~ HT + MG
)examples/dag_sim_data.qmd we simulated data that encodes the DAG structure.applications_1_choropleth.qmd we create a choropleth map of the United States using the simulated data from aboveapplications_2_forest_plots.qmd we create a forest plot of the data using the same simulated data.applications_3_ridge_plots.qmd we create a ridgeline plot of the data using the same simulated data.applications_4_distributions.qmd we examine distributions of variablesapplications_5_time_trends.qmd we examine time trends of variablesapplications_6_scale_honesty.qmd we examine how axes can be used to mislead or clarifyapplications_7_visualizing_models.qmd we visualize model outputsGraduate Summer Institute of Epidemiology and Biostatistics